<template>
    <div>
        <el-button @click="btn">key强制刷新</el-button>
        <h1>test key发生变化</h1>
        <div class="box">

        </div>
    </div>
</template>

<script>
    export default {
        methods:{
            btn(){
                // symbol() 不被重复的唯一值
                this.$emit("ResetKey",Symbol());
            }
        },
        beforeCreate(){
            console.log("key beforeCreate")
        },
        created(){
            console.log("key created")
        },
        beforeMount(){
            console.log("key beforeMount")
        },
        mounted(){
            console.log("key mounted")
        },
        beforeUpdate(){
            console.log("key beforeUpdate")
        },
        updated(){
            console.log("key updated")
        },
        beforeDestroy(){
            console.log("key beforeDestroy")
        },
        destroyed(){
            console.log("key destroyed")
        },
    }
</script>

<style lang="scss" scoped>
    div{
        .box{
            width: 100px;
            height: 100px;
            background-color: aquamarine;
        }
    }
</style>